'''
Description: 整理 tensorboard 内容
Author: 
LastEditors: M
'''
import os ,shutil
DIR = os.path.dirname(__file__)
output_dir = "output"
if __name__ == "__main__":
    for f in os.listdir(output_dir):
        fp = os.path.join(DIR,output_dir,f)
        if os.path.isfile(fp) and f.find("events.out")!=-1:
            run_dir = os.path.join(DIR,output_dir, f.split("-")[-1])
            if not os.path.exists(run_dir):
                os.makedirs(run_dir)
            shutil.move(fp,run_dir)
            
